home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
util
/
shell
/
compare1.rea
< prev
next >
Wrap
Text File
|
1997-03-02
|
2KB
|
61 lines
Short: Shell tool for comparing files
Author: ben@bmatthew.demon.co.uk (Ben Matthew)
Uploader: ben@bmatthew.demon.co.uk (Ben Matthew)
Type: util/shell
Compare 1.0
A simple shell program that compares the contents of two files reporting
whether they are the same or not.
The advantage of this program over other such programs is that it reports
back the error codes, as follows:
OK - The files are the same
WARN - The files are not the same
ERROR - Could not load the files
FATAL - Memory failure
Therefore simply scripts can be formulated, i.e.:
.key f1,f2
compare <f1> <f2> QUIET
if warn
echo "Files are not the same"
; do stuff
else
echo "Files are the same
; do other stuff
endif
Arguments are straigtforward enough:
compare {first file} {second file} [QUIET]
2 args are compulsory, the third (quiet), can be excluded. Quiet allows
the program to operate on a purely script basis whilst omitting this
will cause Compare to report on various things.
Source included. This program is hereby released into the public domain
- no warranties or guarantees are held with this program you may do with
it, the source and any accompanying files what you will.
If you need a specific feature mail me at:
ben@bmatthew.demon.co.uk
Adios
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
11472 7221 37.0% 31-Jan-97 17:53:38 compare
1896 773 59.2% 31-Jan-97 17:53:28 compare.c
1252 668 46.6% 31-Jan-97 20:14:04 compare.readme
-------- ------- ----- --------- --------
14620 8662 40.7% 01-Feb-97 01:42:40 3 files